package com.topnav.mc.admin.entity;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.topnav.mc.entity.base.BaseEntity;
import com.topnav.mc.validator.group.IAdd;
import com.topnav.mc.validator.group.IUpdate;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * 说明：采集站，存储服务
 * @类名: Site
 * <p>
 *
 * </p>
 * @author   kenny
 * @Date	 2021年12月1日下午5:22:14
 */
@Data
@TableName("mc_site")
public class Site extends BaseEntity{

	/** */
	private static final long serialVersionUID = 5229096938457080937L;

	@NotBlank(message = "不允许为空",groups={IAdd.class})
	private String code;
	@NotBlank(message = "不允许为空",groups={IAdd.class})
	private String name;

	@NotBlank(message = "不允许为空",groups={IAdd.class})
	private String host;

	//@NotBlank(message = "不允许为空",groups={IAdd.class})
	private Integer port;

	@NotBlank(message = "不允许为空",groups={IAdd.class})
	private String url;

	/** 1 采集站，2存储 */
	@NotNull(message = "不允许为空",groups={IAdd.class})
    @Min(value=1,message = "必须1-2",groups={IAdd.class})
    @Max(value=2,message = "必须1-2",groups={IAdd.class})
	private Integer type;

	private String manufacture;

	private Long orgId;

	private String softVersion;

	@ApiModelProperty(value="状态：1、正常，2、报废, 3、维修")
	@NotNull(message = "不允许为空",groups={IAdd.class})
	private Integer state;

	private String ftpPort;
	private String ftpUser;
	private String ftpPassword;

	// 加ftp相关的属性


/*	@TableField(exist=false)
	private Organization organization;*/

	private Double capacity;

	@ApiModelProperty(value="在线状态")
	private Boolean online=true;
}
